package models;
 
import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;
 
@Entity
public class Event extends Model {
    public Date createdOn;
    public Date cancledOn;
    public Date deletedOn;

    public String name;
    public String description;
    public Double price;

    public Date startDate;
	public Date endDate;

    @ManyToOne
    public User createdBy;

    @ManyToOne
    public User canceledBy;

    @ManyToOne
    public User deletedBy;

    @ManyToOne
    public ObjectLevel level;
    
    public Event(String name, String description, Date startDate, Date endDate, double price) {
        this.name = name;
        this.description = description;
        this.startDate = startDate;
		this.endDate = endDate;
        this.price = price;
    }

    @Override
    public String toString() {
        return this.name+", "+this.description;    //To change body of overridden methods use File | Settings | File Templates.
    }
}